home *** CD-ROM | disk | FTP | other *** search
- Path: newsbf02.news.aol.com!not-for-mail
- From: rodolfus@aol.com (Rodolfus)
- Newsgroups: comp.lang.c++
- Subject: Re: file descriptors and fstreams...
- Date: 6 Apr 1996 21:31:43 -0500
- Organization: America Online, Inc. (1-800-827-6364)
- Sender: root@newsbf02.news.aol.com
- Message-ID: <4k79ef$lq1@newsbf02.news.aol.com>
- References: <4k780i$dd5@beyond.escape.com>
- Reply-To: rodolfus@aol.com (Rodolfus)
- NNTP-Posting-Host: newsbf02.mail.aol.com
-
- in c++ to get input from a file or send input to a file you can use
- functions ifstream
- and ofstream from fstream.h in the following fashion:
-
- ifstream in("nameofifle"); or
- ofstream out("nameoffile");
-
- after this you can write for example
-
- in >> ...
- out << ...
-
- or you can even do this
- cin = in; or
- cout = out;
- and from that point on cin and cout will do I/O from the file named
- "nameoffile"
-
- I hope this helps you ...
-